<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
  .container {
    position: relative;
    height: 200px;
    border: 2px solid black;
  }
  .div-no-space {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: red;
  }
</style>
</head>
<body>
 
<div class="container">
  <div class="div-no-space"></div>
  这里的文本不会被上面的红色div所覆盖，因为它被设置为不占据空间。
</div>
 
</body>
</html>